package org.xx.armory.spring5.jdbc;

import org.springframework.dao.DataRetrievalFailureException;

/**
 * 从ResultSet中获取数据时出现的错误。
 * <p>可以指定出现错误的具体列序号（从1开始。）</p>
 */
public class ResultSetAccessException
        extends DataRetrievalFailureException {
    public ResultSetAccessException(
            String msg
    ) {
        super(msg);
    }

    public ResultSetAccessException(
            String msg,
            Throwable cause
    ) {
        super(msg, cause);
    }

    public ResultSetAccessException(
            String msg,
            int columnIndex
    ) {
        super(msg + ", column=" + columnIndex);
    }

    public ResultSetAccessException(
            String msg,
            int columnIndex,
            Throwable cause
    ) {
        super(msg + ", column=" + columnIndex, cause);
    }
}
